package com.ky.home.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ky.common.vo.R;
import com.ky.home.entity.Baolubi;
import com.ky.home.mapper.BaolubiMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lgh
 * @since 2024-06-20
 */
@RestController
@RequestMapping("/home")
public class BaolubiController {
    @Autowired
    BaolubiMapper bolubiMapper;
    @RequestMapping("/baolubi/selectBySchoolName/{schoolName}")
    public R selectBySchoolName(@PathVariable("schoolName") String schoolName) {
        QueryWrapper<Baolubi> bolubiQueryWrapper = new QueryWrapper<>();
        bolubiQueryWrapper.eq("school_name",schoolName);
        return R.ok(bolubiMapper.selectBySchoolName(schoolName));
    }
}

